package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.XxScheduleManagementRoleMapper;
import com.ruoyi.system.domain.XxScheduleManagementRole;
import com.ruoyi.system.service.IXxScheduleManagementRoleService;
import com.ruoyi.common.core.text.Convert;

/**
 * 雄信权限相关角色Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-04-12
 */
@Service
public class XxScheduleManagementRoleServiceImpl implements IXxScheduleManagementRoleService 
{
    @Autowired
    private XxScheduleManagementRoleMapper xxScheduleManagementRoleMapper;

    /**
     * 查询雄信权限相关角色
     * 
     * @param id 雄信权限相关角色主键
     * @return 雄信权限相关角色
     */
    @Override
    public XxScheduleManagementRole selectXxScheduleManagementRoleById(Integer id)
    {
        return xxScheduleManagementRoleMapper.selectXxScheduleManagementRoleById(id);
    }

    /**
     * 查询雄信权限相关角色列表
     * 
     * @param xxScheduleManagementRole 雄信权限相关角色
     * @return 雄信权限相关角色
     */
    @Override
    public List<XxScheduleManagementRole> selectXxScheduleManagementRoleList(XxScheduleManagementRole xxScheduleManagementRole)
    {
        return xxScheduleManagementRoleMapper.selectXxScheduleManagementRoleList(xxScheduleManagementRole);
    }

    /**
     * 新增雄信权限相关角色
     * 
     * @param xxScheduleManagementRole 雄信权限相关角色
     * @return 结果
     */
    @Override
    public int insertXxScheduleManagementRole(XxScheduleManagementRole xxScheduleManagementRole)
    {
        xxScheduleManagementRole.setCreateTime(DateUtils.getNowDate());
        return xxScheduleManagementRoleMapper.insertXxScheduleManagementRole(xxScheduleManagementRole);
    }

    /**
     * 修改雄信权限相关角色
     * 
     * @param xxScheduleManagementRole 雄信权限相关角色
     * @return 结果
     */
    @Override
    public int updateXxScheduleManagementRole(XxScheduleManagementRole xxScheduleManagementRole)
    {
        xxScheduleManagementRole.setUpdateTime(DateUtils.getNowDate());
        return xxScheduleManagementRoleMapper.updateXxScheduleManagementRole(xxScheduleManagementRole);
    }

    /**
     * 批量删除雄信权限相关角色
     * 
     * @param ids 需要删除的雄信权限相关角色主键
     * @return 结果
     */
    @Override
    public int deleteXxScheduleManagementRoleByIds(String ids)
    {
        return xxScheduleManagementRoleMapper.deleteXxScheduleManagementRoleByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除雄信权限相关角色信息
     * 
     * @param id 雄信权限相关角色主键
     * @return 结果
     */
    @Override
    public int deleteXxScheduleManagementRoleById(Integer id)
    {
        return xxScheduleManagementRoleMapper.deleteXxScheduleManagementRoleById(id);
    }
}
